package com.ld.security.server.blog.modules.da.api;


import com.ld.security.common.tomcat.anno.AjaxLogKey;
import com.ld.security.server.blog.modules.da.dis.HtmpDispatch;
import com.ld.security.server.blog.modules.da.entity.DaHtmlEntity;
import com.ld.security.common.mybatis.base.po.IdsPo;
import com.ld.security.common.mybatis.base.vo.DataVo;
import com.ld.security.common.tomcat.base.api.SuperApi;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


@RestController
@Api(tags="数据文本Api管理")
@RequestMapping("/api/daHtml")
public class DaHtmlApi  extends SuperApi<DaHtmlEntity>{

        @Autowired
        HtmpDispatch htmpDispatch;

        @AjaxLogKey
        @ApiOperation("调度执行")
        @RequestMapping(value = "/startDispatch",method = RequestMethod.POST)
        public DataVo startDispatch(@RequestBody IdsPo po){
                int total = htmpDispatch.startDispatch(po);

                return DataVo.ofMsg("成功调度"+total+"个数据");
        }

        }
